<script type="text/javascript">
  function changeVisibility(id) {
    document.getElementById(id).style.visibility
    if (document.getElementById(id).style.visibility == "collapse")
      document.getElementById(id).style.visibility = "visible";
    else
      document.getElementById(id).style.visibility = "collapse";
  }
  </script>
<div id="badge" style="margin: 2px 2px 2px 2px;padding: 1px 1px 1px 1px;border: thin solid #000">
  <div style="font-size:20;font-weight:bold">Show your solidarity for 'CRAP Free Software'</div>
  <a href="javascript:changeVisibility('details')"><img src="http://www.crap4j.org/images/iknowmycrap.png" border=0></a>     
</div>
<div id="details" style="visibility: hidden">
  <div style="text-align:center">
    <p style="font-weight:bold">Badge linking to your project's CRAP score:<br/>
      <input type=text style="width: 60em" value="<%= "<a href='#{stat_url(@stat)}'><img src='http://#{request.host_with_port}/images/iknowmycrap.png' border=0></a>" %>"><br/>
    </p>
  </div>
  <div style="text-align:center">
    <p style="font-weight:bold">Badge linking to Crap4j:<br/>
      <input type=text style="width: 60em"  value="<%= "<a href='http://#{request.host_with_port}/'><img src='http://#{request.host_with_port}/images/iknowmycrap.png' border=0></a>" %>"><br/>
    </p>
  </div>
</div>

